import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import index from '@/components/index'
import order_list from '@/components/order_list'
import list_detail from '@/components/list_detail'
import busin_list from '@/components/busin_list'
import busin_detail from '@/components/busin_detail'
import me from '@/components/me'
import login from '@/components/login'
import error from '@/components/error'

Vue.use(Router)

export default new Router({
// mode: 'history',//加这个模式需要后台配合
//	history: false,
//hashbang: true,
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
      meta: {
            title: '首页'
        }
    },
    {
      path: '/login',
      name: 'login',
      component: login,
      meta: {
            title: '登录'
        }
    },
    {
      path: '/order_list',
      name: 'order_list',
      component: order_list,
//     children:[
//     {path:'list_detail',component:list_detail}
//     ]
    },
    {
      path: '/busin_list',
      name: 'busin_list',
      component: busin_list
    },
    {
      path: '/me',
      name: 'me',
      component: me
    },
    {
      path: '/list_detail/:id',
      name: 'list_detail',
      component: list_detail
    },
    {
      path: '/busin_detail/:id',
      name: 'busin_detail',
      component: busin_detail
    },
    {
      path: '*',
      name: 'error',
      component: error
    }
  ]
})